
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpImGroup.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpImUsermsgForm"
 */
public class CcpImUsermsgForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _ciuGuid = null;
   private java.lang.String _ciuUser = null;
   private java.lang.String _ciuTitle = null;
   private java.lang.String _ciuType = null;
   private java.lang.String _ciuSender = null;
   private java.lang.String _cimGuid = null;
   private java.lang.String _ciuBtime = null;
   private java.lang.String _ciuEtime = null;
   private java.lang.String _ciuResv1 = null;
   private java.lang.String _ciuResv2 = null;
   private java.lang.String _ciuResv3 = null;

   /**
    * Standard constructor.
    */
   public CcpImUsermsgForm() {
   }

   /**
    * Returns the ciuGuid
    *
    * @return the ciuGuid
    */
   public java.lang.String getCiuGuid() {
      return _ciuGuid;
   }

   /**
    * Sets the ciuGuid
    *
    * @param ciuGuid the new ciuGuid value
    */
   public void setCiuGuid(java.lang.String ciuGuid) {
      _ciuGuid = ciuGuid;
   }
   /**
    * Returns the ciuUser
    *
    * @return the ciuUser
    */
   public java.lang.String getCiuUser() {
      return _ciuUser;
   }

   /**
    * Sets the ciuGuid
    *
    * @param ciuGuid the new ciuGuid value
    */
   public void setCiuUser(java.lang.String ciuUser) {
      _ciuUser = ciuUser;
   }

   /**
    * Returns the ciuTitle
    *
    * @return the ciuTitle
    */
   public java.lang.String getCiuTitle() {
      return _ciuTitle;
   }

   /**
    * Sets the ciuTitle
    *
    * @param ciuTitle the new ciuTitle value
    */
   public void setCiuTitle(java.lang.String ciuTitle) {
      _ciuTitle = ciuTitle;
   }
   /**
    * Returns the ciuType
    *
    * @return the ciuType
    */
   public java.lang.String getCiuType() {
      return _ciuType;
   }

   /**
    * Sets the ciuType
    *
    * @param ciuType the new ciuType value
    */
   public void setCiuType(java.lang.String ciuType) {
      _ciuType = ciuType;
   }
   /**
    * Returns the ciuSender
    *
    * @return the ciuSender
    */
   public java.lang.String getCiuSender() {
      return _ciuSender;
   }

   /**
    * Sets the ciuSender
    *
    * @param ciuSender the new ciuSender value
    */
   public void setCiuSender(java.lang.String ciuSender) {
      _ciuSender = ciuSender;
   }

   /**
    * Returns the cimGuid
    *
    * @return the cimGuid
    */
   public java.lang.String getCimGuid() {
      return _cimGuid;
   }

   /**
    * Sets the cimGuid
    *
    * @param cimGuid the new cimGuid value
    */
   public void setCimGuid(java.lang.String cimGuid) {
      _cimGuid = cimGuid;
   }
   /**
    * Returns the ciuBtime
    *
    * @return the ciuBtime
    */
   public java.lang.String getCiuBtime() {
      return _ciuBtime;
   }

   /**
    * Sets the ciuBtime
    *
    * @param ciuBtime the new ciuBtime value
    */
   public void setCiuBtime(java.lang.String ciuBtime) {
      _ciuBtime = ciuBtime;
   }
   /**
    * Returns the ciuEtime
    *
    * @return the ciuEtime
    */
   public java.lang.String getCiuEtime() {
      return _ciuEtime;
   }

   /**
    * Sets the ciuEtime
    *
    * @param ciuEtime the new ciuEtime value
    */
   public void setCiuEtime(java.lang.String ciuEtime) {
      _ciuEtime = ciuEtime;
   }
   /**
    * Returns the ciuResv1
    *
    * @return the ciuResv1
    */
   public java.lang.String getCiuResv1() {
      return _ciuResv1;
   }

   /**
    * Sets the ciuResv1
    *
    * @param ciuResv1 the new ciuResv1 value
    */
   public void setCiuResv1(java.lang.String ciuResv1) {
      _ciuResv1 = ciuResv1;
   }
   /**
    * Returns the ciuResv2
    *
    * @return the ciuResv2
    */
   public java.lang.String getCiuResv2() {
      return _ciuResv2;
   }

   /**
    * Sets the ciuResv2
    *
    * @param ciuResv2 the new ciuResv2 value
    */
   public void setCiuResv2(java.lang.String ciuResv2) {
      _ciuResv2 = ciuResv2;
   }
   /**
    * Returns the ciuResv3
    *
    * @return the ciuResv3
    */
   public java.lang.String getCiuResv3() {
      return _ciuResv3;
   }

   /**
    * Sets the ciuResv3
    *
    * @param ciuResv3 the new ciuResv3 value
    */
   public void setCiuResv3(java.lang.String ciuResv3) {
      _ciuResv3 = ciuResv3;
   }

   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCiuGuid() == null) {
         errors.add("ciuGuid", new ActionError("error.ciuGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
